import java.applet.*;
import java.awt.*;
import java.io.*;

public class Test extends Applet implements Runnable{
	Thread t= null;
	boolean status;
	String msg="Hello This is Harshitha and you? ";
	public void init(){
		setBackground(Color.red);
		setForeground(Color.white);
	}
	
	public void start(){
		t=new Thread(this);
		status=false;
		t.start();
	}
	
	public void run(){
		char ch;
		for( ; ;){
			try{
			repaint();
			Thread.sleep(250);
			ch=msg.charAt(0);
			msg=msg.substring(1,msg.length());
			msg+=ch;
			if(status)
				break;
			}catch(InterruptedException e){
				
			}
		}
	}
	
	public void stop(){
		status=true;
		t=null;
	}
	
	public void paint(Graphics g){
		g.drawString(msg,75,150);
	}
}
